/*
 * Created by SharpDevelop.
 * User: rseward
 * Date: 3/17/2008
 * Time: 5:16 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;

namespace AvvaMobileNHibernateHelperKit
{
	public enum LanguageGenerator {
		CSharp,
		VBNet
	}
	
	/// <summary>
	/// Description of Project.
	/// </summary>
	public class Project
	{
		private static Project currentProject;
		
		public static Project CurrentProject {
			get {
				if (currentProject==null) {
					currentProject = new Project();
				}
				return currentProject;
			}			
		}
		
		private string projectFile = "project.xml";
		
		private string serverName = "localhost";
		private string instanceName = "MSSQL2005";
		private string username = "sa";
		private string password = "password";
		private string databaseName = "";
		
		private string nameSpace = "";
		private string assemblyName = "";
		private string projectDir = Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments);
		private BaseDatabaseDriver dbDriver = new SqlServerDriver();
		private INameFormatter nameFormatter = new CamelCaseNameFormatter();
		private LanguageGenerator classLanguageGenerator = LanguageGenerator.CSharp;
		
		private bool copyNHibernateDll = false;
		private bool copyLog4netDll = false;
		private bool copyNullablesDll = false;
		private bool dynamicUpdate = false;
		
		private string[] selectedTables = {};
		
		public Project()
		{
		}
		
		public bool DynamicUpdate{
			get { return dynamicUpdate; }
			set { dynamicUpdate = value; }
		}
		
		public string ProjectFile {
			get { return projectFile; }
			set { projectFile = value; }
		}
		
		public string[] SelectedTables {
			get { return selectedTables; }
			set { selectedTables = value; }
		}
		
		public string ServerName {
			get { return serverName; }
			set { serverName = value; }
		}
		
		public string InstanceName {
			get { return instanceName; }
			set { instanceName = value; }
		}
		
		public string Username {
			get { return username; }
			set { username = value; }
		}
		
		public bool CopyNHibernateDll {
			get { return copyNHibernateDll; }
			set { copyNHibernateDll = value; }
		}

		public bool CopyLog4netDll {
			get { return copyLog4netDll; }
			set { copyLog4netDll = value; }
		}

		public bool CopyNullablesDll {
			get { return copyNullablesDll; }
			set { copyNullablesDll = value; }
		}
		
		public string Password {
			get { return password; }
			set { password = value; }
		}
		
		public string DatabaseName {
			get { return databaseName; }
			set { databaseName = value; }
		}
		
		public string Namespace {
			get { return nameSpace; }
			set { nameSpace = value; }
		}
		
		public string AssemblyName {
			get { return assemblyName; }
			set { assemblyName = value; }
		}
		
		public string ProjectDir {
			get { return projectDir; }
			set { projectDir = value; }
		}
		
		public BaseDatabaseDriver DbDriver {
			get { return dbDriver; }
			set { dbDriver = value; }
		}
		
		public INameFormatter NameFormatter {
			get { return nameFormatter; }
			set { nameFormatter = value; }
		}
		
		public LanguageGenerator ClassLanguageGenerator {
			get { return classLanguageGenerator; }
			set { classLanguageGenerator = value; }
		}
	}
}
